<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="tutorial.css">
<TITLE>
String processing
</TITLE>
</HEAD>
<BODY >
<A HREF="tutorial030.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial023.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="tutorial032.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc65">4.8</A>&nbsp;&nbsp;String processing</H2>
ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> (unlike many Prolog systems) provides a string data type
and the corresponding string manipulation predicates, e.g.
string_length/2, concat_string/2, split_string/4, substring/4,
and conversion from and to other data types, e.g.
string_list/2, atom_string/2, number_string/2, term_string/2.
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
?- string_length("hello", N).
N = 5
Yes (0.00s cpu)
?- concat_string([abc, 34, d], S).
S = "abc34d"
Yes (0.00s cpu)
?- string_list("hello", L).
L = [104, 101, 108, 108, 111]
Yes (0.00s cpu)
?- term_string(foo(3, bar), S).
S = "foo(3, bar)"
Yes (0.00s cpu)
</PRE></BLOCKQUOTE>
<HR>
<A HREF="tutorial030.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="tutorial023.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="tutorial032.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
